package com.ph.clouds.tracker.emun;

/**
 * @Author yushuangjiang
 * @Time 2021/8/2 15:11
 * @Description： 事件类型枚举
 */
public enum EventEmum {

    //***********启动页***************
    LAUNCH("1010", "启动"),
    P_CONTACT("11010", "客户授权获取访问通讯录权限"),
    //***********登录***************
    LOGIN("1510", "登录页面可见"),
    LOGIN_INPUT_TEL("1520", "输入手机号"),
    LOGIN_GET_CODE("1530", "获取验证码(短信)"),
    LOGIN_KEYIN_CODE("1540", "输入验证码"),
    LOGIN_CHECK_AGREE("1550", "勾选注册协议"),
    LOGIN_ONCLICK("1560", "点击登录"),
    LOGIN_SUCCESS("1570", "登录成功"),
    LOGIN_FAILED("1580", "登录失败"),
    GUIDE_RESUME("1020","引导页可见"),
    //********权限*******
    PERMISSION_GUIDE_RESUME("1110","授权提示（页面可见）"),
    PERMISSION_GUIDE_VIEW_PRIVATY("1111","查看 隐私协议"),
    PERMISSION_GUIDE_CHECK_PRIVATY("1112","勾选 同意隐私协议"),
    PERMISSION_GUIDE_CLICK_APPLY("1113","点击 同意授权按钮"),
    PERMISSION_GUIDE_CONTARCT("1114","客户授权获取访问通讯录权限"),
    PERMISSION_GUIDE_PHONE_STATUE("1115","获取手机号、IMEI、IMS权限"),
    PERMISSION_GUIDE_PHOTO("1116","客户授权获取访问相册权限"),
    PERMISSION_GUIDE_CAMARA("1117","客户授权获取访问相机权限"),
    PERMISSION_GUIDE_LOCATION("1118","客户授权获取访问设备定位权限"),
    PERMISSION_GUIDE_PRIVATY_DIALOG("1120","隐私协议弹窗（页面可见）"),
    PERMISSION_GUIDE_AGREE("1121","二次同意 隐私协议"),
    PERMISSION_GUIDE_REJECT("1122","二次拒绝 隐私协议"),
    //***********首页***************
    RESUME_HOME("2010", "主页"),
    HOME_APPLY_CLICK("2020", "申请"),
    BANNER_CLICK("2060","banner图"),
    LOAN_GUIDE_CLICK("2070","借款指引"),
    COUPON_CLICK("2080","优惠券"),
    QUESTION_CLICK("2090","常见问题"),
    //***********额度选择***************
    LOAN_CHOICE_LIMIT_CLICK("2040", "客户申请额度"),
    LOAN_CHOICE_TERM_CLICK("2050", "客户申请期限"),
    LOAN_CHOICE_SUBMIT_CLICK("2030", "确认申请"),
    RELOAN_CHOICE_LIMIT_CLICK("3010", "客户申请额度"),
    RELOAN_CHOICE_TERM_CLICK("3020", "客户申请期限"),
    RELOAN_CHOICE_SUBMIT_CLICK("3030", "确认申请"),
    //***********基本资料录入***************
    RESUME_BASIC_INFO("4010", "基本信息页"),
    KEY_IN_FIRST_NAME("4020", "姓名First Name"),
    KEY_IN_LAST_NAME("4021", "姓名Last Name"),
    KEY_IN_M_NAME("4022", "姓名Middle Name"),
    KEY_IN_GENDER("4030", "性别"),
    KEY_IN_BIRTHDAY("4040", "出生日期"),
    KEY_IN_EDUCATION("4050", "教育信息"),
    RESUME_REG_INFO("4060", "户口信息（页面可见）"),
//    RESUME_REG_ADDRESS_INFO("4070", "户口地址（页面可见）"),
    REG_ADDRESS_PROVINCE_CLICK("4071", "户口省"),
    REG_ADDRESS_TOWN_CLICK("4072", "户口市"),
    REG_ADDRESS_AREA_CLICK("4073", "户口区"),
    REG_ADDRESS_DETAILS("4074", "户口详细地址"),

    LIVE_ADDRESS_CLICK("4080", "居住地址（页面可见）"),
    LIVE_ADDRESS_PROVINCE_CLICK("4081", "居住省"),
    LIVE_ADDRESS_TOWN_CLICK("4082", "居住市"),
    LIVE_ADDRESS_AREA_CLICK("4083", "居住区"),
    LIVE_ADDRESS_DETAILS("4084", "居住详细地址"),
    LIVE_ADDRESS_TIME("4110", "居住时长"),

    RESUME_MARRIAL_INFO("4120", "婚姻信息(页面可见)"),
    MARRIAL_STATUE_CLICK("4130", "婚姻状况"),
    CHILDREN_COUNT_CLICK("4140", "子女个数"),

    RESUME_SOCIAL_INFO("4150", "社交信息(页面可见)"),
    SOCIAL_EMAIL("4160", "邮箱地址"),
    SOCIAL_FACEBOOK("4170", "Facebook账号"),
    RESUME_CONTACT_INFO("4180", "紧急联系人信息页(页面可见"),

//    RESUME_CONTACT("6010", "紧急联系人信息页(页面可见)"),
    CONTACT_MAIN_CLICK("4190", "主要联系人关系"),
    KEY_IN_CONTACT_MAIN_NAME("4200", "主要联系人姓名"),
    CONTACT_MAIN_TEL_CLICK("4210", "主要联系人电话"),

    CONTACT_SECOND_CLICK("4220", "次要联系人关系"),
    KEY_IN_CONTACT_SECOND_NAME("4230", "次要联系人姓名"),
    CONTACT_SECOND_TEL_CLICK("4240", "次要联系人电话"),

    CONTACT_3("4025", "联系电话2"),
    CONTACT_THIRD_CLICK("4250", "第三紧急联系人关系"),
    KEY_IN_CONTACT_THIRD_NAME("4260", "第三紧急联系人姓名"),
    CONTACT_THIRD_TEL_CLICK("4270", "第三紧急联系人电话"),

    //***********工作资料录入***************
    RESUME_WORK_INFO("5010", "工作信息页(页面可见)"),
    KEY_IN_COMPANY_NAME("5020", "公司名称"),
    KEY_IN_COMPANY_ADDRESS("5030", "公司地址"),
    KEY_IN_COMPANY_TEL("5040", "公司电话"),
    OCCUPATION_CLICK("5050", "职业"),
    INCOME_CLICK("5060", "工作收入"),
    MONEY_FIRST_DAY_CLICK("5070", "第一发薪日"),
    MONEY_SECOND_DAY_CLICK("5080", "第二发薪日"),
    WORK_TIME_LENGTH_CLICK("5090", "工作时长"),
    WORK_BACK_CLICK("5099", "客户返回至上一页面的埋点"),

    //***********证件资料录入***************
    RESUME_LICENCE_INFO("6010", "证件信息页(页面可见)"),
    ID_TYPE_CLICK("6080", "证件类型"),
    KEY_IN_ID_TYPE("6090", "证件号码"),
    P_CAMARA("11020", "客户授权获取访问相机权限"),

    IDENTITY_CLICK("6095", "用户证件照"),
    IDENTITY_UPLOAD_SUCESS("6100", "用户证件正面照上传成功"),
    IDENTITY_UPLOAD_FAILD("6110", "用户证件正面照上传失败"),
    IDENTITY_HOLD_IDCARD_CLICK("6120", "手持身份证"),
    HOLD_IDCARD_UPLOAD_SUCESS("6130", "用户证件手持照上传成功"),
    HOLD_IDCARD_UPLOAD_FAILD("6140", "用户证件手持照上传失败"),
    HOLD_IDCARD_CARAMA_OPEN("6180", "相机界面可见"),


    //活体
    VIEW_LIVE_DETECT_PHOTO("6510", "活体验证"),
    VIEW_LIVE_DETECT_NOT_SUPPORTED("6520", "设备不支持活体"),
    VIEW_LIVE_DETECT_VERIFY_FAILED("6530", "活体识别失败"),
    VIEW_LIVE_DETECT_UPLOAD_SUCCESS("6540", "活体识别上传成功"),
    VIEW_LIVE_DETECT_UPLOAD_ERROR("6550", "活体识别上传失败"),
    VIEW_LIVE_DETECT_BACK("6599", "客户返回上一层级页面"),

    RESUME_TAKE_PHOTO("6180", "相机界面可见"),
    IDENTITY_FRONT_CANCEL_CLICK("6190", "用户证件正面照取消"),
    IDENTITY_FRONT_SAVE_CLICK("6200", "用户证件正面照  拍照保存"),
    IDENTITY_FRONT_CANCEL_TAKED_CLICK("6210", "用户证件正面照 拍照后取消"),
    IDENTITY_HOLD_CANCEL_CLICK("6220", "用户证件手持照取消"),
    IDENTITY_HOLD_SAVE_CLICK("6230", "用户证件手持照保存"),
    IDENTITY_HOLD_CANCEL_TAKED_CLICK("6240", "用户证件手持照 拍照后取消"),
    PIC_CANCEL_CLICK("6250", "本人照片取消"),
    PIC_SAVE_CLICK("6260", "本人照片保存"),
    PIC_TAKED_CANCEL_CLICK("6270", "本人照片拍照后取消"),
    PIC_BACK_CLICK("6099", "客户返回至上一页面"),

    //***********借贷确认页***************
    RESUME_LOAN_CONFIRM("7010", "确认借款页(页面可见)"),
    DIALOG_SUBMIT_LOAN_RESUME("7020", "借款声明弹窗"),
    DIALOG_SUBMIT_LOAN_CONFIRM("7021", "借款声明同意"),
    DIALOG_SUBMIT_LOAN_CANCEL("7022", "借款声明拒绝"),

    RESUME_RECIEVE_METHOD("7110", "收款方式（页面可见）"),
    WITHDRAW_METHOD_CLICK("7120", "取款方式"),
    WITHDRAW_TYPE_CLICK("7130", "电子钱包/门店名称/所属银行"),
    KEY_IN_APPLY_FIRST_NAME("7140", "姓"),
    KEY_IN_APPLY_SECOND_NAME("7150", "名"),
    KEY_IN_APPLY_MIDDLE_NAME("7160", "中间名"),
    KEY_IN_APPLY_ACCOUNT("7170", "账号/银行卡号"),

    APPLY_CONTRACT_CLICK("7180", "合同点击"),
    APPLY_CONTRACT_CHECK_CLICK("7190", "勾选合同"),
    APPLY_SUBMIT_CLICK("7200", "提交点击"),
    APPLY_SUBMIT_SUCESS("7210", "提交成功"),
    APPLY_SUBMIT_BACK("7099", "客户返回至上一页"),
    //***********推荐***************
    RECOMMEND_APPLY("13010", "申请"),
    RECOMMEND_APPLY_CLICK("13020", "二次确认申请"),
    RECOMMEND_REFUSE_CLICK("13030", "拒绝推荐"),
    //
    APP_EXIT_CLICK("12010", "退出APP的埋点");

    private String caseValue;
    private String caseName;

    EventEmum(String value, String caseName) {
        this.caseValue = value;
        this.caseName = caseName;
    }


    public String getCaseValue() {
        return caseValue;
    }

    public void setCaseValue(String caseValue) {
        this.caseValue = caseValue;
    }

    public String getCaseName() {
        return caseName;
    }

    public void setCaseName(String caseName) {
        this.caseName = caseName;
    }

    public static EventEmum fromTypeCaseValue(String caseValue) {
        for (EventEmum type : EventEmum.values()) {
            if (type.getCaseValue().equals(caseValue)) {
                return type;
            }
        }
        return null;
    }

    }
